package com.goods.service.impl;

import com.goods.resp.Item;
import com.goods.service.IGoodsService;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class GoodsServiceImpl implements IGoodsService {

    private static HashMap<String,Item> ITEM_MAP = new HashMap<String,Item>();

    static {

        ITEM_MAP.put("1001",new Item("1001","茅台53度500ml","www.baidu.com","飞天茅台","1499"));
        ITEM_MAP.put("1002",new Item("1002","五粮液","www.baidu.com","五粮液","1099"));

    }

    @Override
    public Item getItemById(String goodsId) {



        return ITEM_MAP.get(goodsId);
    }
}
